package lib.self.adapter.recycler;

import android.view.View;

/**
 * description: 单样式RecyclerAdapter
 * author: Steven Xiao
 * date: 2017/5/16
 */
public abstract class RecyclerAdapterEx<T, VH extends RecyclerViewHolderEx> extends MultiRecyclerAdapterEx<T, VH> {

    @Override
    protected final void refreshView(int position, VH holder, int itemType) {
        refreshView(position, holder);
    }

    @Override
    public final int getConvertViewResId(int itemType) {
        return getConvertViewResId();
    }

    @Override
    protected final VH initViewHolder(View view, int itemType) {
        return initViewHolder(view);
    }

    @Override
    public int getItemViewType(int position) {
        return 0;
    }

    protected abstract void refreshView(int position, VH holder);

    protected abstract int getConvertViewResId();

    protected abstract VH initViewHolder(View view);
}
